About the project

The aim of this task is data collection as my friends and I were considering to launch a pet mobile application/startup serving pets in Egypt.

The goal is to list the pet shops along with their details [address, phone numbers, email, ratings, etc.].

This is done using google maps apis.

This is how the data looks raw in json format

The below code has 3 tags/clusters in dictionary of k,v format.

Each tag has search terms, i.e. in the pet shops tag we have the below search terms:

  1. pet store
  2. pet shop
  3. pet food
  4. pet supplies
  5. pet accessories

For each tag I'll try and type all possible search terms I can think of, then I'll enumerate for each search term inside each search tag.

The below code will also structure the json data in the following columns:

Search tags result count

The below is the ammount of rows inside each search term

Duplicates

Checking for row duplicate stores

I'll remove duplicate rows, since different search terms can return the same pet shop.

Checking for id duplicate stores

Remove duplicate by id

Querying place details

Below, I will be adding the phone number (either mobile or landline) and opearting hours for each day of the week.

Note: That this data requires fees to be paid, so I'd be careful here.

Joining detailed data with initial one

Most pet stores with ratings

Plots

The below is the cateogry distribution for each search tag. We have mostly vets, then pet shops more than shelters which makes sense.

The below is the distribution by district.

This is a facet for the distribution by district for each search tag.

Writing cleaned data to file